Other Structs

The following structs are available globally.

  • A type-erased ObserverType.

    Forwards operations to an arbitrary underlying observer with the same Element type, hiding the specifics of the underlying observer type.

    See more

    Declaration

    Swift

    public struct AnyObserver<Element> : ObserverType
  • Data structure that represents queue.

    Complexity of enqueue, dequeue is O(1) when number of operations is averaged over N operations.

    Complexity of peek is O(1).

    See more

    Declaration

    Swift

    public struct Queue<T>: SequenceType
  • Unique identifier for object added to Bag.

    See more

    Declaration

    Swift

    public struct BagKey : Hashable
  • Bag

    Data structure that represents a bag of elements typed T.

    Single element can be stored multiple times.

    Time and space complexity of insertion an deletion is O(n).

    It is suitable for storing small number of elements.

    See more

    Declaration

    Swift

    public struct Bag<T> : CustomDebugStringConvertible